<?php
echo $this->adminToolBar('template', 'index', '/admin/template/add/', '/admin/template/edit/', '/admin/template/delete/', '');
?> 
<?php
if(count($this->template_arr) > 0)
{
?>
<div class="mid-content">
<table class="box-table-a" width="100%"> 
    <thead>
        <tr>
            <th scope="col" width="15%">Module</th>
            <th scope="col" width="20%">Template Title</th>
            <th scope="col" width="45%">Template Content</th>
            <th scope="col" width="5%">&nbsp;</th>
            <th scope="col" width="5%">&nbsp;</th>
        </tr>
    </thead>    
<?php 
    foreach($this->template_arr as $template) :         
?>
    <tr>
        <td width="15%"><?php echo $template['module_name'];?></td>
        <td width="20%"><?php echo $template['template_title'];?></td>
        <td width="45%"><?php echo htmlentities(substr($template['template_content_en'], 0, 200));?></td>
        <td width="3%"><a href="javascript: void(0);" onclick="loadPage('/admin/template/edit/template_id/<?php echo $template['template_id']; ?>');" title="Edit"><img src="/images/admin/icons/edit.gif" alt=""/></a>                   
        </td>
        <td width="3%"><a href="javascript: void(0);" onclick="deleteTemplate('<?php echo $template['template_id']; ?>');" title="Delete"><img src="/images/admin/icons/disable.gif" alt=""/></a></td>
    </tr>
<?php endforeach; ?>
</table>
</div>
<?php
}
?>